let arr = [1,2,3,4,5]



Array.prototype.myFindIndex = function(callback) {
    for(let i = 0; i < this.length; i++) {
        if(callback(this[i], i, this)) {
            return i
        }
    }
    return - 1
}
let a = arr.myFindIndex(item => 5 == item)
console.log(a);
